﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">


	
<ui:composition template="template.xhtml">	
	<ui:define name="title">Pagina Inicial</ui:define>

	<ui:define name="content">
	    	<!--  start page-heading -->
	<div id="page-heading">
	
		<h1>Lista de Pacientes</h1>
	</div>
	<!-- end page-heading -->

	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id="content-table-inner">
		
			<!--  start table-content  -->
			<div id="table-content">
			
				<!--  start message-yellow -->
				<h:panelGroup layout="block" id="message-yellow" rendered="#{controlTelaInicial.exibeMensagemInbox}">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td class="yellow-left">You have a new message. <a href="mensagens.xhtml">Go to Inbox.</a></td>
						<td class="yellow-right"><a class="close-yellow"><img src="images/table/icon_close_yellow.gif"   alt="" /></a></td>
					</tr>
				</table>
				</h:panelGroup>
				
				<!--  end message-yellow -->
				
				<!--  start message-red -->
				<h:panelGroup layout="block" id="message-red" rendered="#{controlTelaInicial.exibeMensagemInsucesso}">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td class="red-left">Error. <a href="">Please try again.</a></td>
						<td class="red-right"><a class="close-red"><img src="images/table/icon_close_red.gif"   alt="" /></a></td>
					</tr>
				</table>
				</h:panelGroup>
				<!--  end message-red -->			

			
				<!--  start message-green -->
				<h:panelGroup layout="block" id="message-green" rendered="#{controlTelaInicial.exibeMensagemSucesso}">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="green-left">Product added sucessfully. <a href="">Add new one.</a></td>
					<td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif"   alt="" /></a></td>
				</tr>
				</table>
				</h:panelGroup>
				<!--  end message-green -->
		
		 
				<!--  start product-table ..................................................................................... -->
				
				
				<h:dataTable var="pac" border="0" width="100%" cellpadding="0" cellspacing="0" styleClass="product-table" value="#{controlPaciente.listaPaciente}">
						<h:column headerClass="table-header-repeat line-left"><f:facet name="header" ><a href="">Id</a></f:facet>#{pac.id}</h:column>					
						<h:column headerClass="table-header-repeat line-left"><f:facet name="header" ><a href="">Nome Completo</a></f:facet>#{pac.nome}</h:column>					
						<h:column headerClass="table-header-repeat line-left"><f:facet name="header" ><a href="">Convenio</a></f:facet>#{pac.convenio}</h:column>					
						<h:column headerClass="table-header-repeat line-left"><f:facet name="header"><a href="">Inicio do Tratamento</a></f:facet>#{pac.inicio_tratamento}</h:column>					
						<h:column headerClass="table-header-repeat line-left">
							<f:facet name="header"><a href="">Ações</a></f:facet>
							<h:form>
								<h:commandLink styleClass="icon-1 info-tooltip" title="Editar" id="editarPaciente">
	            					<f:param  id="idpaciente" name="idpaciente" value="#{pac.id}"/>  
	         					</h:commandLink>
	         					
	         					<h:commandLink styleClass="icon-5 info-tooltip" title="Cadastrar Exame" action="#{exameBean.cadastrarExame}" id="cadastrarExame">
	            					<f:param  id="id" name="id" value="#{pac.id}"/>  
	         					</h:commandLink>
	         					
	         					<h:commandLink styleClass="icon-3 info-tooltip" title="Cadastrar Sessão"  action="#{hemodialiseBean.cadastrarSessao}" id="cadastrarSessao">
	            					<f:param  id="idPaci" name="idPaci" value="#{pac.id}"/>  
	         					</h:commandLink>
	         					 									
							</h:form>
						</h:column>												
				</h:dataTable>
				
				
			</div>
			<!--  end content-table  -->
		
			<!--  start actions-box ............................................... -->
			<div id="actions-box">
				<a href="" class="action-slider"></a>
				<div id="actions-box-slider">
					<a href="" class="action-edit">Edit</a>
					<a href="" class="action-delete">Delete</a>
				</div>
				<div class="clear"></div>
			</div>
			<!-- end actions-box........... -->
			
			<!--  start paging..................................................... -->
			<table border="0" cellpadding="0" cellspacing="0" id="paging-table">
			<tr>
			<td>
				<a href="" class="page-far-left"></a>
				<a href="" class="page-left"></a>
				<div id="page-info">Page <strong>1</strong> / 15</div>
				<a href="" class="page-right"></a>
				<a href="" class="page-far-right"></a>
			</td>
			<td>
			<select  class="styledselect_pages">
				<option value="">Number of rows</option>
				<option value="">1</option>
				<option value="">2</option>
				<option value="">3</option>
			</select>
			</td>
			</tr>
			</table>
			<!--  end paging................ -->
			
			<div class="clear"></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>
	</ui:define>
</ui:composition>
</html>
